<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('工单表列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
            <input id="toolbarss" th:value="${id}" hidden>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "system/pend";
    var f = $('#toolbarss').val();
    $(function () {
        var options = {
            url: prefix + "/dataList/"+f,
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "工单表",
            columns: [{
                checkbox: true
            },
                {
                    field: 'id',
                    title: 'id',
                    visible: false
                },
                {
                    field: 'count',
                    title: '转移次数'
                },
                {
                    field: 'createUser',
                    title: '创建人'
                },
                {
                    field: 'holdUser',
                    title: '持有者'
                },
                {
                    field: 'custName',
                    title: '顾客姓名'
                },
                {
                    field: 'createTime',
                    title: '创建时间'
                },
                {
                    field: 'workStatus',
                    title: '工单状态',
                    formatter: function (value) {
                        if (value == '0' ){
                            return '<div >新工单审核</div>'
                        }else {
                            return '<div >已处理</div>'
                        }
                    }
                },
                {
                    field: 'faultDescription',
                    title: '故障描述'
                },
                {
                    field: 'faultPhotoAddress',
                    title: '故障照片'
                },
                {
                    field: 'completeDescription',
                    title: '处理完成描述'
                },
                {
                    field: 'finishPhotoAddress',
                    title: '处理完成照片'
                }]
        };
        $.table.init(options);
    });
    function submitHandler() {
        $.modal.refresh()
    }
</script>
</body>
</html>
